<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>vuePress 的使用笔记 | 地球反三体组织</title>
    <meta name="generator" content="VuePress 1.7.1">
    <link rel="icon" href="/icons/favicon.ico">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.slim.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.2/jquery.fancybox.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.2/jquery.fancybox.min.css">
    <meta name="description" content="">
    
    <link rel="preload" href="/assets/css/0.styles.95f09eca.css" as="style"><link rel="preload" href="/assets/js/app.892efb48.js" as="script"><link rel="preload" href="/assets/js/3.3689c535.js" as="script"><link rel="preload" href="/assets/js/1.76946483.js" as="script"><link rel="preload" href="/assets/js/15.41a71b1f.js" as="script"><link rel="prefetch" href="/assets/js/10.994dfc46.js"><link rel="prefetch" href="/assets/js/11.5243d02b.js"><link rel="prefetch" href="/assets/js/12.bbc947db.js"><link rel="prefetch" href="/assets/js/13.3c555110.js"><link rel="prefetch" href="/assets/js/14.791ae1f2.js"><link rel="prefetch" href="/assets/js/16.ea9f6e56.js"><link rel="prefetch" href="/assets/js/17.8d9b3f45.js"><link rel="prefetch" href="/assets/js/18.990bf501.js"><link rel="prefetch" href="/assets/js/19.37c1c21a.js"><link rel="prefetch" href="/assets/js/20.5aae01e6.js"><link rel="prefetch" href="/assets/js/21.41e758f1.js"><link rel="prefetch" href="/assets/js/22.afc2de9d.js"><link rel="prefetch" href="/assets/js/23.7a76c57a.js"><link rel="prefetch" href="/assets/js/24.ee89a782.js"><link rel="prefetch" href="/assets/js/25.aae5f43e.js"><link rel="prefetch" href="/assets/js/26.eec74c57.js"><link rel="prefetch" href="/assets/js/27.cdae5890.js"><link rel="prefetch" href="/assets/js/28.85c693b7.js"><link rel="prefetch" href="/assets/js/29.d40f3724.js"><link rel="prefetch" href="/assets/js/30.cdb0bfe0.js"><link rel="prefetch" href="/assets/js/31.f83a512c.js"><link rel="prefetch" href="/assets/js/32.87779683.js"><link rel="prefetch" href="/assets/js/33.e9f606e7.js"><link rel="prefetch" href="/assets/js/34.6b5688ff.js"><link rel="prefetch" href="/assets/js/35.a0ba89c1.js"><link rel="prefetch" href="/assets/js/36.18a00568.js"><link rel="prefetch" href="/assets/js/37.fd83be59.js"><link rel="prefetch" href="/assets/js/38.cf0ec149.js"><link rel="prefetch" href="/assets/js/39.3a424296.js"><link rel="prefetch" href="/assets/js/4.4ef4e9bb.js"><link rel="prefetch" href="/assets/js/40.3ac4f22a.js"><link rel="prefetch" href="/assets/js/41.f4119124.js"><link rel="prefetch" href="/assets/js/42.926201e5.js"><link rel="prefetch" href="/assets/js/43.b8af425d.js"><link rel="prefetch" href="/assets/js/44.b5af9721.js"><link rel="prefetch" href="/assets/js/45.2cf05349.js"><link rel="prefetch" href="/assets/js/46.6ef53d5a.js"><link rel="prefetch" href="/assets/js/47.0c0d1d6f.js"><link rel="prefetch" href="/assets/js/48.afcf25ca.js"><link rel="prefetch" href="/assets/js/49.56f7da91.js"><link rel="prefetch" href="/assets/js/5.152764ca.js"><link rel="prefetch" href="/assets/js/50.6dbb0658.js"><link rel="prefetch" href="/assets/js/6.8ab23831.js"><link rel="prefetch" href="/assets/js/7.b1119581.js"><link rel="prefetch" href="/assets/js/8.ebb978a3.js"><link rel="prefetch" href="/assets/js/9.a72af8f5.js">
    <link rel="stylesheet" href="/assets/css/0.styles.95f09eca.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container no-sidebar" data-v-73b6f1b4><div data-v-73b6f1b4><div id="loader-wrapper" class="loading-wrapper" data-v-d48f4d20 data-v-73b6f1b4 data-v-73b6f1b4><div class="loader-main" data-v-d48f4d20><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div></div> <!----> <!----></div> <div class="password-shadow password-wrapper-out" style="display:none;" data-v-58d5ab76 data-v-73b6f1b4 data-v-73b6f1b4><h3 class="title" style="display:none;" data-v-58d5ab76 data-v-58d5ab76>地球反三体组织</h3> <!----> <label id="box" class="inputBox" style="display:none;" data-v-58d5ab76 data-v-58d5ab76><input type="password" value="" data-v-58d5ab76> <span data-v-58d5ab76>Konck! Knock!</span> <button data-v-58d5ab76>OK</button></label> <div class="footer" style="display:none;" data-v-58d5ab76 data-v-58d5ab76><span data-v-58d5ab76><i class="iconfont reco-theme" data-v-58d5ab76></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-58d5ab76>vuePress-theme-reco</a></span> <span data-v-58d5ab76><i class="iconfont reco-copyright" data-v-58d5ab76></i> <a data-v-58d5ab76><span data-v-58d5ab76>kuangw</span>
            
          <!---->
          2020
        </a></span></div></div> <div class="hide" data-v-73b6f1b4><header class="navbar" data-v-73b6f1b4><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <div class="pt-bgBar"></div> <a href="/" class="home-link router-link-active"><img src="/images/logo.png" alt="地球反三体组织" class="logo"> <span class="site-name">地球反三体组织</span></a> <div class="links"><div><div class="my-color isDrak"><div class="div1"><img src="http://photo.tuituisoft.com/picgo/20201202095920.png" alt></div> <div class="div2"><img src="http://photo.tuituisoft.com/picgo/20201202095945.png" alt></div></div></div> <div class="search-box"><i class="iconfont reco-search"></i> <input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link"><i class="iconfont iconfont iconhome"></i>
  Home
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      Category
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/book/" class="nav-link"><i class="iconfont undefined"></i>
  book
</a></li><li class="dropdown-item"><!----> <a href="/categories/code/" class="nav-link"><i class="iconfont undefined"></i>
  code
</a></li><li class="dropdown-item"><!----> <a href="/categories/tool/" class="nav-link"><i class="iconfont undefined"></i>
  tool
</a></li></ul></div></div><div class="nav-item"><a href="/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  Tag
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont undefined"></i>
      工具
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/tool/vuepress/" aria-current="page" class="nav-link router-link-exact-active router-link-active"><i class="iconfont undefined"></i>
  vuepress(博客框架)
</a></li><li class="dropdown-item"><!----> <a href="/tool/picgo.html" class="nav-link"><i class="iconfont undefined"></i>
  PicGo(图床工具)
</a></li><li class="dropdown-item"><h4>vscode</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/tool/vscode/plug-recommend.html" class="nav-link"><i class="iconfont undefined"></i>
  vscode插件推荐
</a></li><li class="dropdown-subitem"><a href="/tool/vscode/diy-code.html" class="nav-link"><i class="iconfont undefined"></i>
  如何自定义vscode的代码块
</a></li><li class="dropdown-subitem"><a href="/tool/vscode/code-block.html" class="nav-link"><i class="iconfont undefined"></i>
  常用代码块
</a></li></ul></li></ul></div></div><div class="nav-item"><a href="/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间线
</a></div> <a href="https://gitee.com/kuangweiwudi/my-node" target="_blank" rel="noopener noreferrer" class="repo-link"><i class="iconfont reco-github"></i>
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask" data-v-73b6f1b4></div> <aside class="sidebar" data-v-73b6f1b4><div class="personal-info-wrapper" data-v-3eba7259 data-v-73b6f1b4><img src="http://image.woai996.com/picgo/20201127101131.png" alt="author-avatar" class="personal-img" data-v-3eba7259> <h3 class="name" data-v-3eba7259>
    kuangw
  </h3> <div class="num" data-v-3eba7259><div data-v-3eba7259><h3 data-v-3eba7259>29</h3> <h6 data-v-3eba7259>Article</h6></div> <div data-v-3eba7259><h3 data-v-3eba7259>22</h3> <h6 data-v-3eba7259>Tag</h6></div></div> <hr data-v-3eba7259></div> <nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link"><i class="iconfont iconfont iconhome"></i>
  Home
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      Category
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/book/" class="nav-link"><i class="iconfont undefined"></i>
  book
</a></li><li class="dropdown-item"><!----> <a href="/categories/code/" class="nav-link"><i class="iconfont undefined"></i>
  code
</a></li><li class="dropdown-item"><!----> <a href="/categories/tool/" class="nav-link"><i class="iconfont undefined"></i>
  tool
</a></li></ul></div></div><div class="nav-item"><a href="/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  Tag
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont undefined"></i>
      工具
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/tool/vuepress/" aria-current="page" class="nav-link router-link-exact-active router-link-active"><i class="iconfont undefined"></i>
  vuepress(博客框架)
</a></li><li class="dropdown-item"><!----> <a href="/tool/picgo.html" class="nav-link"><i class="iconfont undefined"></i>
  PicGo(图床工具)
</a></li><li class="dropdown-item"><h4>vscode</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/tool/vscode/plug-recommend.html" class="nav-link"><i class="iconfont undefined"></i>
  vscode插件推荐
</a></li><li class="dropdown-subitem"><a href="/tool/vscode/diy-code.html" class="nav-link"><i class="iconfont undefined"></i>
  如何自定义vscode的代码块
</a></li><li class="dropdown-subitem"><a href="/tool/vscode/code-block.html" class="nav-link"><i class="iconfont undefined"></i>
  常用代码块
</a></li></ul></li></ul></div></div><div class="nav-item"><a href="/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间线
</a></div> <a href="https://gitee.com/kuangweiwudi/my-node" target="_blank" rel="noopener noreferrer" class="repo-link"><i class="iconfont reco-github"></i>
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav> <!----> </aside> <div class="password-shadow password-wrapper-in" style="display:none;" data-v-58d5ab76 data-v-73b6f1b4><h3 class="title" style="display:none;" data-v-58d5ab76 data-v-58d5ab76>vuePress 的使用笔记</h3> <!----> <label id="box" class="inputBox" style="display:none;" data-v-58d5ab76 data-v-58d5ab76><input type="password" value="" data-v-58d5ab76> <span data-v-58d5ab76>Konck! Knock!</span> <button data-v-58d5ab76>OK</button></label> <div class="footer" style="display:none;" data-v-58d5ab76 data-v-58d5ab76><span data-v-58d5ab76><i class="iconfont reco-theme" data-v-58d5ab76></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-58d5ab76>vuePress-theme-reco</a></span> <span data-v-58d5ab76><i class="iconfont reco-copyright" data-v-58d5ab76></i> <a data-v-58d5ab76><span data-v-58d5ab76>kuangw</span>
            
          <!---->
          2020
        </a></span></div></div> <div data-v-73b6f1b4><main class="page"><div class="page-title" style="display:none;position:relative;"><div class="page-bg-img"><img src="https://w.wallhaven.cc/full/x8/wallhaven-x815j3.png"></div> <h1>vuePress 的使用笔记</h1> <hr> <div data-v-523cfaee><i class="iconfont reco-account" data-v-523cfaee><span data-v-523cfaee>kuangw</span></i> <i class="iconfont reco-date" data-v-523cfaee><span data-v-523cfaee>2020-11-20</span></i> <i class="iconfont reco-eye" data-v-523cfaee><span id="/tool/vuepress/" data-flag-title="Your Article Title" class="leancloud-visitors" data-v-523cfaee><a class="leancloud-visitors-count" style="font-size:.9rem;font-weight:normal;color:#d6dce5;"></a></span></i> <i class="iconfont reco-tag tags" data-v-523cfaee><span class="tag-item" data-v-523cfaee>vuepress</span><span class="tag-item" data-v-523cfaee>工具</span></i></div></div> <div class="theme-reco-content content__default" style="display:none;"><h1 id="vuepress-的使用笔记"><a href="#vuepress-的使用笔记" class="header-anchor">#</a> vuePress 的使用笔记</h1> <h2 id="前言"><a href="#前言" class="header-anchor">#</a> 前言</h2> <div class="custom-block tip"><p class="custom-block-title">为什么要使用 vuepress</p> <p>博客的作为文档的输出工具，选择一款合适的框架，是十分重要的
我个人是 vue 的粉丝，所以，选择<code>vuepress</code>也是当仁不让
当然也有一些其他的博客网站也十分好用，或者有些人喜欢手撸，这当然都是可以的。
<a href="https://coder.itclan.cn/fontend/tools/vuepress-build-blog/" target="_blank" rel="noopener noreferrer">参考文档<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></div> <h2 id="前置准备"><a href="#前置准备" class="header-anchor">#</a> 前置准备</h2> <ol><li>最新的 node 版本</li> <li>有一定的 md 书写经验</li> <li>有 node 的使用经验</li></ol> <h2 id="安装"><a href="#安装" class="header-anchor">#</a> 安装</h2> <div class="language- extra-class"><pre class="language-text"><code># 1. 初始化
npm init -y
# 2. 安装vuepress (全局或者局部选择一个进行安装就可以了)
# 全局安装
npm install -g vuepress
# 局部安装
npm install  vuepress

</code></pre></div><blockquote><p>在 pack.json 内加入以下配置</p></blockquote> <div class="language-json extra-class"><pre class="language-json"><code><span class="token property">&quot;scripts&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
  <span class="token property">&quot;dev&quot;</span><span class="token operator">:</span> <span class="token string">&quot;vuepress dev docs&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;build&quot;</span><span class="token operator">:</span> <span class="token string">&quot;vuepress build docs&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div><div class="custom-block tip"><p>上面的配置,可以让我们通过 npm 快速启动或者打包项目,后面我们可以输入以下指令来触发一些效果</p> <ul><li><code>npm run dev</code> 多用于开发环境，启动一个临时编译的本地环境</li> <li><code>npm run bulid</code> 打包成静态资源，多用于部署在服务器上</li></ul></div> <h2 id="目录结构初始"><a href="#目录结构初始" class="header-anchor">#</a> 目录结构初始</h2> <ol><li>新建文件夹<code>./docs</code></li></ol> <blockquote><p>存放我们写的博客</p></blockquote> <ol start="2"><li>新建文件夹 <code>./docs/.vuepress</code></li></ol> <blockquote><p>存放静态资源和配置</p></blockquote> <ol start="3"><li>新建文件 <code>./docs/.vuepress/config.js</code></li></ol> <blockquote><p>主要的入口配置文件</p></blockquote> <ol start="4"><li>新建文件 <code>./docs/readme.md</code></li></ol> <blockquote><p>首页</p></blockquote> <ol start="5"><li>在 config.js 内输入以下的内容</li></ol> <div class="language-js extra-class"><pre class="language-js"><code>module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;name网站&quot;</span><span class="token punctuation">,</span>
  description<span class="token operator">:</span> <span class="token string">&quot;name的网站,专注前端技术栈分享&quot;</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre></div><ol start="6"><li>在<code>./docs/readme.md</code>增加以下内容</li></ol> <div class="language-yaml extra-class"><pre class="language-yaml"><code><span class="token punctuation">---</span>
<span class="token key atrule">home</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
<span class="token key atrule">heroImage</span><span class="token punctuation">:</span> /images/logo.png
<span class="token key atrule">heroText</span><span class="token punctuation">:</span> 地球反三体组织
<span class="token key atrule">tagline</span><span class="token punctuation">:</span> 希望三体人🐀尾汁，耗耗反思，不要搞 ，窝里斗 <span class="token punctuation">-</span><span class="token punctuation">-</span> 执剑人·🐎·保国
<span class="token key atrule">actionText</span><span class="token punctuation">:</span> 开始阅读 →
<span class="token key atrule">actionLink</span><span class="token punctuation">:</span> /home.md
<span class="token key atrule">features</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> <span class="token key atrule">title</span><span class="token punctuation">:</span> 简洁至上
  <span class="token key atrule">details</span><span class="token punctuation">:</span> 以 Markdown 为中心的项目结构，以最少的配置帮助你专注于写作。
<span class="token punctuation">-</span> <span class="token key atrule">title</span><span class="token punctuation">:</span> Vue驱动
  <span class="token key atrule">details</span><span class="token punctuation">:</span> 享受 Vue + webpack 的开发体验，在 Markdown 中使用 Vue 组件，同时可以使用 Vue 来开发自定义主题。
<span class="token punctuation">-</span> <span class="token key atrule">title</span><span class="token punctuation">:</span> 高性能
  <span class="token key atrule">details</span><span class="token punctuation">:</span> VuePress 为每个页面预渲染生成静态的 HTML，同时在页面被加载的时候，将作为 SPA 运行。
<span class="token key atrule">footer</span><span class="token punctuation">:</span> 湘ICP备2020022053号 <span class="token punctuation">|</span> Copyright © 2020<span class="token punctuation">-</span>present kuangw
<span class="token punctuation">---</span>
</code></pre></div><div class="custom-block tip"><p class="custom-block-title">提醒</p> <p>在第 6 点的配置中，存在一个图片路径，实际上我们并没有这个路径
可以新建文件夹 <code>/docs/.vuepress/public/images/</code>,将图片放进去,
这个文件主要存放公共资源</p></div> <ol start="7"><li>输入<code>npm run dev</code> 启动</li></ol> <h2 id="配置"><a href="#配置" class="header-anchor">#</a> 配置</h2> <div class="custom-block tip"><p class="custom-block-title">关于配置</p> <ul><li>配置的 <a href="https://v0.vuepress.vuejs.org/zh/config/" target="_blank" rel="noopener noreferrer">官方文档<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li> <li>一旦更改配置后，都要重新运行项目才会得到更新</li></ul></div> <h3 id="配置文件的拆分"><a href="#配置文件的拆分" class="header-anchor">#</a> 配置文件的拆分</h3> <div class="custom-block tip"><p class="custom-block-title">分模块配置</p> <ul><li>由于<code>config.js</code>配置的内容过多，所以建议使用模块导出的方式分别将配置文件放在不同的 js 文件中方便之后管理维护。</li> <li>所以以下我会新建一个文件夹专门存放配置的子目录<code>/docs/.vuepress/confing/</code></li></ul> <div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">// 在nav.js</span>
<span class="token keyword">const</span> nav <span class="token operator">=</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">;</span>
module<span class="token punctuation">.</span>exports <span class="token operator">=</span> nav<span class="token punctuation">;</span>
</code></pre></div><div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">// 在config.js</span>
<span class="token keyword">const</span> nav <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">&quot;./config/nav&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;kw的博客网站&quot;</span><span class="token punctuation">,</span>
  description<span class="token operator">:</span> <span class="token string">&quot;kw的博客网站,专注前端技术栈分享&quot;</span><span class="token punctuation">,</span>
  themeConfig<span class="token operator">:</span> <span class="token punctuation">{</span>
    logo<span class="token operator">:</span> <span class="token string">&quot;/images/logo.png&quot;</span><span class="token punctuation">,</span>
    nav<span class="token punctuation">,</span> <span class="token comment">// nav为导入内容</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre></div><ul><li>之后其他的配置文件，如果必要都会采用这种方式不再赘述，至于名字或者目录接口可以看个人的喜好，当然写在一个 js 内也是完全可以的</li></ul></div> <h3 id="配置顶部导航"><a href="#配置顶部导航" class="header-anchor">#</a> 配置顶部导航</h3> <div class="custom-block tip"><p class="custom-block-title">顶部导航级数</p> <p>vuepress 导航分为<code>一级导航</code> 、<code>二级导航</code>和<code>三级导航</code></p> <ul><li>一级导航是顶部导航栏横幅那条</li> <li>当二级导航配置后,悬浮一级导航时,会出现下列菜单,这里面就是配置的二级导航</li> <li>当三级导航配置时,下列菜单的二级导航会变为粗体,而三级导航会出现在下方变为二级导航的子条目</li> <li>具目前来看，不太可能有 4 级导航，大多数人也不太需要</li></ul> <p><img src="/assets/img/sp20201120_165828_975.fc2f4c21.png" alt="导航级数"></p></div> <h4 id="顶部导航的-log"><a href="#顶部导航的-log" class="header-anchor">#</a> 顶部导航的 log</h4> <div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">// .vuepress/config.js</span>
module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  themeConfig<span class="token operator">:</span> <span class="token punctuation">{</span>
    logo<span class="token operator">:</span> <span class="token string">&quot;/assets/img/logo.png&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre></div><h4 id="顶部导航一级导航"><a href="#顶部导航一级导航" class="header-anchor">#</a> 顶部导航一级导航</h4> <div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">// .vuepress/config.js</span>
module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  themeConfig<span class="token operator">:</span> <span class="token punctuation">{</span>
    nav<span class="token operator">:</span> <span class="token punctuation">[</span>
      <span class="token punctuation">{</span> text<span class="token operator">:</span> <span class="token string">&quot;Home&quot;</span><span class="token punctuation">,</span> link<span class="token operator">:</span> <span class="token string">&quot;/&quot;</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
      <span class="token punctuation">{</span> text<span class="token operator">:</span> <span class="token string">&quot;前端&quot;</span><span class="token punctuation">,</span> link<span class="token operator">:</span> <span class="token string">&quot;/front/&quot;</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
      <span class="token punctuation">{</span> text<span class="token operator">:</span> <span class="token string">&quot;后端&quot;</span><span class="token punctuation">,</span> link<span class="token operator">:</span> <span class="token string">&quot;/server/&quot;</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre></div><div class="custom-block tip"><p class="custom-block-title">关于配置的字段</p> <ul><li>text 是描述的文字，</li> <li>link 是路径,可以是相对路径或者网路链接</li> <li>路径如果没有指定具体的文件，会自动寻找文件夹下的<code>index.md</code> 或者 <code>readme.md</code> ,也可以指定具体的文件名，来增加文件的辨识度</li></ul></div> <h4 id="配置-2、3-级导航"><a href="#配置-2、3-级导航" class="header-anchor">#</a> 配置 2、3 级导航</h4> <div class="custom-block tip"><p class="custom-block-title">关于 2、3 级导航</p> <ul><li>2、3 级导航的配置方法完全和一级导航类似</li> <li>如果你需要 2 级导航，就在对象中增加一个<code>items</code>的数组就行了,三级也是一样, 代码如下</li></ul> <div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">// .vuepress/config/nav.js</span>
<span class="token keyword">const</span> nav <span class="token operator">=</span> <span class="token punctuation">[</span>
  <span class="token punctuation">{</span>
    text<span class="token operator">:</span> <span class="token string">&quot;vue&quot;</span><span class="token punctuation">,</span>
    link<span class="token operator">:</span> <span class="token string">&quot;/vue/&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token punctuation">{</span>
    text<span class="token operator">:</span> <span class="token string">&quot;javascript&quot;</span><span class="token punctuation">,</span>
    link<span class="token operator">:</span> <span class="token string">&quot;/js/&quot;</span><span class="token punctuation">,</span>
    items<span class="token operator">:</span> <span class="token punctuation">[</span>
      <span class="token punctuation">{</span>
        text<span class="token operator">:</span> <span class="token string">&quot;es6&quot;</span><span class="token punctuation">,</span>
        link<span class="token operator">:</span> <span class="token string">&quot;/js/es6.md&quot;</span><span class="token punctuation">,</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
      <span class="token punctuation">{</span>
        text<span class="token operator">:</span> <span class="token string">&quot;js中的数组方法&quot;</span><span class="token punctuation">,</span>
        link<span class="token operator">:</span> <span class="token string">&quot;/js/arr-function.md&quot;</span><span class="token punctuation">,</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token punctuation">{</span>
    text<span class="token operator">:</span> <span class="token string">&quot;css&quot;</span><span class="token punctuation">,</span>
    link<span class="token operator">:</span> <span class="token string">&quot;/css/&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">;</span>
</code></pre></div><ul><li>如果你的博客还不多，建议先使用一级导航，然后再使用二级导航，三级导航其实都很少用到</li> <li>当你配置了<code>items</code>字段后，<code>link</code>属性就不再生效了</li></ul></div> <h3 id="配置侧边栏"><a href="#配置侧边栏" class="header-anchor">#</a> 配置侧边栏</h3> <div class="custom-block tip"><p class="custom-block-title">tip</p> <ul><li>vuepress 默认是没有侧边栏的</li> <li>我们可以通过配置开启侧边栏</li> <li>侧边栏有自动或手动两种方式</li> <li>自动侧边栏会查找 md 文件中的 h2 和 h3 标签，最大的深度为 2 默认为 1</li></ul></div> <h4 id="设置所有文件自动侧边栏"><a href="#设置所有文件自动侧边栏" class="header-anchor">#</a> 设置所有文件自动侧边栏</h4> <div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">// .vuepress\config.js</span>
module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  themeConfig<span class="token operator">:</span> <span class="token punctuation">{</span>
    sidebar<span class="token operator">:</span> <span class="token string">&quot;auto&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre></div><div class="custom-block warning"><p>以上的配置可能就不够灵活</p> <ul><li>可以在需要自动生成侧边栏的页面加入以下配置，灵活的配置</li></ul> <div class="language-yaml extra-class"><pre class="language-yaml"><code><span class="token punctuation">---</span>
<span class="token key atrule">sidebar</span><span class="token punctuation">:</span> auto
<span class="token punctuation">---</span>

</code></pre></div></div> <h4 id="侧边栏分组"><a href="#侧边栏分组" class="header-anchor">#</a> 侧边栏分组</h4> <blockquote><p>如果自动生成不满足不了需求，我们可以配置可以配置分组</p></blockquote> <ol><li>为所有文件都配置侧边栏分组</li></ol> <div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">// .vuepress\config.js</span>
module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  themeConfig<span class="token operator">:</span> <span class="token punctuation">{</span>
    sidebar<span class="token operator">:</span> <span class="token punctuation">[</span>
      <span class="token punctuation">{</span>
        title<span class="token operator">:</span> <span class="token string">&quot;Group 1&quot;</span><span class="token punctuation">,</span>
        collapsable<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
        children<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">&quot;/&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;/js/&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;/js/es6.md&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;/css/&quot;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
      <span class="token punctuation">{</span>
        title<span class="token operator">:</span> <span class="token string">&quot;Group 2&quot;</span><span class="token punctuation">,</span>
        children<span class="token operator">:</span> <span class="token punctuation">[</span>
          <span class="token comment">/* ... */</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre></div><ol start="2"><li>为特定的目录添加分组规则<div class="custom-block tip"><p>这种方式可能才是最为灵活常见的</p></div></li></ol> <div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">// .vuepress\config\sidebar.js</span>
<span class="token comment">//  先定义一个分组数组</span>
<span class="token keyword">const</span> sidebarGroup <span class="token operator">=</span> <span class="token punctuation">[</span>
  <span class="token punctuation">{</span>
    title<span class="token operator">:</span> <span class="token string">&quot;group 1&quot;</span><span class="token punctuation">,</span>
    collapsable<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
    children<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">&quot;/&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;/js/&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;/js/es6.md&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;/css/&quot;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token punctuation">{</span>
    title<span class="token operator">:</span> <span class="token string">&quot;Group 2&quot;</span><span class="token punctuation">,</span>
    children<span class="token operator">:</span> <span class="token punctuation">[</span>
      <span class="token comment">/* ... */</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> sidebar <span class="token operator">=</span> <span class="token punctuation">{</span>
  <span class="token string">&quot;/js/&quot;</span><span class="token operator">:</span> sidebarGroup<span class="token punctuation">,</span>
  <span class="token string">&quot;/&quot;</span><span class="token operator">:</span> <span class="token string">&quot;auto&quot;</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>

<span class="token comment">// 以上的规则就是 js使用我们自定义的规则,其他使用自动生成规则</span>
module<span class="token punctuation">.</span>exports <span class="token operator">=</span> sidebar<span class="token punctuation">;</span>
</code></pre></div><h4 id="关于侧边栏配置的一些补充"><a href="#关于侧边栏配置的一些补充" class="header-anchor">#</a> 关于侧边栏配置的一些补充</h4> <div class="custom-block tip"><ol><li>我们上面说过，自动生成侧边栏，默认深度为 1(但经我测试深度默认为 2),有时候仅匹配 h2 和 h3 标签事不够的，这一点可以通过配置来进行修改</li></ol> <div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">//.vuepress\config.js</span>
module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  markdown<span class="token operator">:</span> <span class="token punctuation">{</span>
    extractHeaders<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">&quot;h2&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;h3&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;h4&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;h5&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;h6&quot;</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token comment">// 增加此配置可以为所有标题匹配</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre></div><ol start="2"><li>如果配置的规则不够灵活，我们应该可以选择在某个 md 文件头部增加配置，来修改</li></ol> <div class="language-yaml extra-class"><pre class="language-yaml"><code><span class="token punctuation">---</span>
<span class="token key atrule">sidebarDepth</span><span class="token punctuation">:</span> <span class="token number">2</span>   <span class="token comment"># 标题深度</span>
<span class="token key atrule">navbar</span><span class="token punctuation">:</span> <span class="token boolean important">false</span>     <span class="token comment"># 禁止顶部导航的出现</span>
<span class="token key atrule">sidebar</span><span class="token punctuation">:</span> auto     <span class="token comment"># 自动设置侧边栏</span>
<span class="token key atrule">sidebar</span><span class="token punctuation">:</span> <span class="token boolean important">false</span>    <span class="token comment"># 禁止侧边栏的出现</span>
<span class="token punctuation">---</span>
</code></pre></div></div> <h3 id="搜索框的配置"><a href="#搜索框的配置" class="header-anchor">#</a> 搜索框的配置</h3> <div class="custom-block tip"><p>我们可以看到，顶部导航的位置有个搜索框，一直没有被使用到，下面将介绍如何使用这个搜索框</p></div> <h4 id="禁用搜索框"><a href="#禁用搜索框" class="header-anchor">#</a> 禁用搜索框</h4> <div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">// .vuepress\config.js</span>
module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  themeConfig<span class="token operator">:</span> <span class="token punctuation">{</span>
    search<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token comment">// 增加此配置以后，你会发现你的搜索框就消失了</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre></div><h4 id="algolia-搜索"><a href="#algolia-搜索" class="header-anchor">#</a> Algolia 搜索</h4> <div class="custom-block tip"><p>默认的搜索只会为<code>h1</code>,<code>h2</code>和<code>h3</code>标题匹配，实际上已经够使用了，但如果我们需要更加强力的搜索可以使用到<code>Algolia 搜索</code>,具体参考文档 <a href="https://v0.vuepress.vuejs.org/zh/default-theme-config/#algolia-%E6%90%9C%E7%B4%A2" target="_blank" rel="noopener noreferrer">Algolia 搜索<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></div> <h3 id="其他配置"><a href="#其他配置" class="header-anchor">#</a> 其他配置</h3> <h4 id="配置最后更新时间"><a href="#配置最后更新时间" class="header-anchor">#</a> 配置最后更新时间</h4> <div class="custom-block tip"><p>最后更新时间默认关闭，可以增加以下配置使它打开</p> <div class="language-js extra-class"><pre class="language-js"><code>module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  themeConfig<span class="token operator">:</span> <span class="token punctuation">{</span>
    lastUpdated<span class="token operator">:</span> <span class="token string">&quot;2020年11月21日&quot;</span><span class="token punctuation">,</span> <span class="token comment">// string | boolean</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre></div></div> <h4 id="点击图片放大预览功能"><a href="#点击图片放大预览功能" class="header-anchor">#</a> 点击图片放大预览功能</h4> <blockquote><p>vuepress 本身没有配置图片点击放大功能，这里我介绍使用一款<code>fancybox</code>的库</p></blockquote> <ol><li>在<code>config.js</code>里面配置</li></ol> <blockquote><p>这个配置主要是在页面头部引入<code>fancybox</code>的cdn链接</p></blockquote> <div class="language-js extra-class"><pre class="language-js"><code>module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  head<span class="token operator">:</span> <span class="token punctuation">[</span>
    <span class="token comment">// add jquert and fancybox</span>
    <span class="token punctuation">[</span>
      <span class="token string">&quot;script&quot;</span><span class="token punctuation">,</span>
      <span class="token punctuation">{</span>
        src<span class="token operator">:</span>
          <span class="token string">&quot;https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.slim.min.js&quot;</span><span class="token punctuation">,</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token punctuation">[</span>
      <span class="token string">&quot;script&quot;</span><span class="token punctuation">,</span>
      <span class="token punctuation">{</span>
        src<span class="token operator">:</span>
          <span class="token string">&quot;https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.2/jquery.fancybox.min.js&quot;</span><span class="token punctuation">,</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token punctuation">[</span>
      <span class="token string">&quot;link&quot;</span><span class="token punctuation">,</span>
      <span class="token punctuation">{</span>
        rel<span class="token operator">:</span> <span class="token string">&quot;stylesheet&quot;</span><span class="token punctuation">,</span>
        type<span class="token operator">:</span> <span class="token string">&quot;text/css&quot;</span><span class="token punctuation">,</span>
        href<span class="token operator">:</span>
          <span class="token string">&quot;https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.2/jquery.fancybox.min.css&quot;</span><span class="token punctuation">,</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
  <span class="token punctuation">]</span><span class="token punctuation">,</span>
  themeConfig<span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token comment">// your config</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre></div><ol start="2"><li>下载vscode插件<code>vuepress-img-format</code>,写完文档后，使用快捷键<code>ctrl+shift+8</code>,插件会自动将文档中的图片链接加上a标签，<code>fancybox</code>需要识别这些a标签才能生效</li></ol></div> <footer class="page-edit" style="display:none;"><div class="edit-link"><a href="https://gitee.com/kuangweiwudi/my-node/edit/master/tool/vuepress/index.md" target="_blank" rel="noopener noreferrer">提出错误！</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <!----></footer> <!----> <!----> <ul class="side-bar sub-sidebar-wrapper" style="width:12rem;" data-v-3fb51744><li class="level-2" data-v-3fb51744><a href="/tool/vuepress/#前言" class="sidebar-link" data-v-3fb51744>前言</a></li><li class="level-2" data-v-3fb51744><a href="/tool/vuepress/#前置准备" class="sidebar-link" data-v-3fb51744>前置准备</a></li><li class="level-2" data-v-3fb51744><a href="/tool/vuepress/#安装" class="sidebar-link" data-v-3fb51744>安装</a></li><li class="level-2" data-v-3fb51744><a href="/tool/vuepress/#目录结构初始" class="sidebar-link" data-v-3fb51744>目录结构初始</a></li><li class="level-2" data-v-3fb51744><a href="/tool/vuepress/#配置" class="sidebar-link" data-v-3fb51744>配置</a></li><li class="level-3" data-v-3fb51744><a href="/tool/vuepress/#配置文件的拆分" class="sidebar-link" data-v-3fb51744>配置文件的拆分</a></li><li class="level-3" data-v-3fb51744><a href="/tool/vuepress/#配置顶部导航" class="sidebar-link" data-v-3fb51744>配置顶部导航</a></li><li class="level-4" data-v-3fb51744><a href="/tool/vuepress/#顶部导航的-log" class="sidebar-link" data-v-3fb51744>顶部导航的 log</a></li><li class="level-4" data-v-3fb51744><a href="/tool/vuepress/#顶部导航一级导航" class="sidebar-link" data-v-3fb51744>顶部导航一级导航</a></li><li class="level-4" data-v-3fb51744><a href="/tool/vuepress/#配置-2、3-级导航" class="sidebar-link" data-v-3fb51744>配置 2、3 级导航</a></li><li class="level-3" data-v-3fb51744><a href="/tool/vuepress/#配置侧边栏" class="sidebar-link" data-v-3fb51744>配置侧边栏</a></li><li class="level-4" data-v-3fb51744><a href="/tool/vuepress/#设置所有文件自动侧边栏" class="sidebar-link" data-v-3fb51744>设置所有文件自动侧边栏</a></li><li class="level-4" data-v-3fb51744><a href="/tool/vuepress/#侧边栏分组" class="sidebar-link" data-v-3fb51744>侧边栏分组</a></li><li class="level-4" data-v-3fb51744><a href="/tool/vuepress/#关于侧边栏配置的一些补充" class="sidebar-link" data-v-3fb51744>关于侧边栏配置的一些补充</a></li><li class="level-3" data-v-3fb51744><a href="/tool/vuepress/#搜索框的配置" class="sidebar-link" data-v-3fb51744>搜索框的配置</a></li><li class="level-4" data-v-3fb51744><a href="/tool/vuepress/#禁用搜索框" class="sidebar-link" data-v-3fb51744>禁用搜索框</a></li><li class="level-4" data-v-3fb51744><a href="/tool/vuepress/#algolia-搜索" class="sidebar-link" data-v-3fb51744>Algolia 搜索</a></li><li class="level-3" data-v-3fb51744><a href="/tool/vuepress/#其他配置" class="sidebar-link" data-v-3fb51744>其他配置</a></li><li class="level-4" data-v-3fb51744><a href="/tool/vuepress/#配置最后更新时间" class="sidebar-link" data-v-3fb51744>配置最后更新时间</a></li><li class="level-4" data-v-3fb51744><a href="/tool/vuepress/#点击图片放大预览功能" class="sidebar-link" data-v-3fb51744>点击图片放大预览功能</a></li></ul></main> <!----></div></div></div></div><div class="global-ui"><div class="back-to-ceiling" style="right:1rem;bottom:6rem;width:2.5rem;height:2.5rem;border-radius:.25rem;line-height:2.5rem;display:none;" data-v-c6073ba8 data-v-c6073ba8><svg t="1574745035067" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5404" class="icon" data-v-c6073ba8><path d="M526.60727968 10.90185116a27.675 27.675 0 0 0-29.21455937 0c-131.36607665 82.28402758-218.69155461 228.01873535-218.69155402 394.07834331a462.20625001 462.20625001 0 0 0 5.36959153 69.94390903c1.00431239 6.55289093-0.34802892 13.13561351-3.76865779 18.80351572-32.63518765 54.11355614-51.75690182 118.55860487-51.7569018 187.94566865a371.06718723 371.06718723 0 0 0 11.50484808 91.98906777c6.53300375 25.50556257 41.68394495 28.14064038 52.69160883 4.22606766 17.37162448-37.73630017 42.14135425-72.50938081 72.80769204-103.21549295 2.18761121 3.04276886 4.15646224 6.24463696 6.40373557 9.22774369a1871.4375 1871.4375 0 0 0 140.04691725 5.34970492 1866.36093723 1866.36093723 0 0 0 140.04691723-5.34970492c2.24727335-2.98310674 4.21612437-6.18497483 6.3937923-9.2178004 30.66633723 30.70611158 55.4360664 65.4791928 72.80769147 103.21549355 11.00766384 23.91457269 46.15860503 21.27949489 52.69160879-4.22606768a371.15156223 371.15156223 0 0 0 11.514792-91.99901164c0-69.36717486-19.13165746-133.82216804-51.75690182-187.92578088-3.42062944-5.66790279-4.76302748-12.26056868-3.76865837-18.80351632a462.20625001 462.20625001 0 0 0 5.36959269-69.943909c-0.00994388-166.08943902-87.32547796-311.81420293-218.6915546-394.09823051zM605.93803103 357.87693858a93.93749974 93.93749974 0 1 1-187.89594924 6.1e-7 93.93749974 93.93749974 0 0 1 187.89594924-6.1e-7z" p-id="5405" data-v-c6073ba8></path><path d="M429.50777625 765.63860547C429.50777625 803.39355007 466.44236686 1000.39046097 512.00932183 1000.39046097c45.56695499 0 82.4922232-197.00623328 82.5015456-234.7518555 0-37.75494459-36.9345906-68.35043303-82.4922232-68.34111062-45.57627738-0.00932239-82.52019037 30.59548842-82.51086798 68.34111062z" p-id="5406" data-v-c6073ba8></path></svg></div></div></div>
    <script src="/assets/js/app.892efb48.js" defer></script><script src="/assets/js/3.3689c535.js" defer></script><script src="/assets/js/1.76946483.js" defer></script><script src="/assets/js/15.41a71b1f.js" defer></script>
  </body>
</html>
